# run_ablation.py
import subprocess

experiments = [
    {'name': 'baseline', 'cmd': 'yolo train model=yolov8n.pt ...'},
    {'name': 'wiou', 'cmd': 'yolo train ... loss=v8DetectionLoss'},
    ...
]

for exp in experiments:
    print(f"Running {exp['name']}")
    subprocess.run(exp['cmd'], shell=True)
    # 自动解析日志
    parse_results(f'runs/detect/{exp["name"]}/results.csv')